//依赖
import React,{useState} from 'react';
import './index.css';
//组件
import Login from './Login';
import BottomCart from './BottomCart';
import Foods from './Foods';


export const GlobalContext = React.createContext();
const Ordering = () => {
  //用户输入的用户名
  const [name,setName] = useState([])
  return (
    <GlobalContext.Provider value={{
      name,
      setName
    }}>
      {/* {console.log(name)} */}
       <div className="order">
        <Login />
        <Foods />
        <BottomCart />
    </div>
    </GlobalContext.Provider>
   
  );
};

export default Ordering;

